<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>部门管理</title>
</head>
<body class="hold-transition skin-black sidebar-mini">
    <div th:replace="common/fragment :: link"></div>
    <div class="wrapper">
        <div th:replace="common/fragment :: navbar"></div>
        <div th:replace="common/fragment :: menu"></div>
        <div class="content-wrapper">
            <section class="content-header">
                <h1>部门管理</h1>
            </section>
            <section class="content">
                <div class="box">
                    <!--高级查询--->
                    <form class="form-inline" id="searchForm" action="/shop/list" method="post">
                        <input type="hidden" name="currentPage" id="currentPage" value="1">
                        <a href="/shop/input" class="btn btn-success btn-input" style="margin: 10px">
                            <span class="glyphicon glyphicon-plus"></span> 添加
                        </a>
                    </form>
                    <!--编写内容-->
                    <div class="box-body table-responsive ">
                        <table class="table table-striped table-hover">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>店铺名称</th>
                                <th>店铺管理员</th>
                                <th>店铺编号</th>
                                <th>店铺商品数量</th>
                                <th>所属商城</th>
                                <th>推荐商品</th>
                                <th></th>
                                <th>店铺状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                                <tr th:each="shop,stat:${pageInfo.list}">
                                    <td th:text="${stat.count}">1</td>
                                    <td th:text="${shop.name}">某某旗舰店</td>
                                    <td th:text="${shop.employee?.name}">老李</td>
                                    <td th:text="${shop.sn}">007</td>
                                    <th th:text="${shop.shopGoodsNum}">1000</th>
                                    <th th:text="${shop.mall?.name}">拼多多</th>
                                    <td>
                                        <span th:each="goods:${shop.goods}">
                                            <a th:data-url="|/goods/input?id=${goods.id}|" class="btn btn-info btn-xs btn_redirect" th:text="${goods.name}">
                                                又是好东西
                                            </a>
                                        </span>
                                    <td>

                                    <td>
                                        <span th:if="${shop.status != null &amp;&amp; shop.status == 1}">
                                            上线
                                        </span>
                                        <span th:if="${shop.status == null || shop.status == 0}">
                                            下线
                                        </span>
                                    </td>

                                    <td>
                                        <a th:href="|/shop/input?id=${shop.id}|" class="btn btn-info btn-xs btn-input">
                                            <span class="glyphicon glyphicon-pencil"></span> 编辑
                                        </a>
                                        <a class="btn btn-danger btn-xs btn-delete" th:data-url="|/shop/delete?id=${shop.id}|">
                                            <span class="glyphicon glyphicon-trash"></span> 删除
                                        </a>
                                    </td>
                                </tr>
                        </table>
                        <div th:replace="common/fragment :: page"></div>
                    </div>
                </div>
            </section>
        </div>
        <div th:replace="common/fragment :: footer"></div>
    </div>
</body>
</html>